package com.lh.bootswagger.entity;

import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * api接口定义表
 */
@Data
@Entity
@Table(name = "t_api_interface")
public class ApiInterface implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7696373259640628818L;

	/**
	 * null
	 * default value: null
	 */
	@Id
	@Column(name = "id", nullable = false, length = 20)
	private Long id;

	/**
	 * 接口名称
	 * default value: null
	 */
	@Column(name = "interface_name", nullable = true, length = 200)
	private String interfaceName;

	/**
	 * 接口描述
	 * default value: null
	 */
	@Column(name = "interface_describe", nullable = true, length = 500)
	private String interfaceDescribe;

	/**
	 * 接口访问地址
	 * default value: null
	 */
	@Column(name = "request_url", nullable = true, length = 300)
	private String requestUrl;

//	/**
//	 * 接口调用地址
//	 * default value: null
//	 */
//	@Column(name = "call_url", nullable = true, length = 300)
//	private String callUrl;

//	/**
//	 * 接口物理地址
//	 * default value: null
//	 */
//	@Column(name = "physics_url", nullable = true, length = 300)
//	private String physicsUrl;

	/**
	 * 1：保存， 2：发布， 3：使用中，4：暂停
	 * default value: null
	 */
	@Column(name = "interface_status", nullable = true, length = 10)
	@NotFound(action= NotFoundAction.IGNORE)
	private String interfaceStatus;

	/**
	 * 所属分类
	 * default value: null
	 */
	@Column(name = "classify_id", nullable = true, length = 20)
	@NotFound(action= NotFoundAction.IGNORE)
	private Long classifyId;

}
